<?php include_once('header.php'); ?>
	<?php
		session_start();
		function check_lang() { 
		if(isSet($_GET['lang']))
		{
			$lang = $_GET['lang'];
			
			// register the session and set the cookie
			$_SESSION['lang'] = $lang;
			
		}
		else if(isSet($_SESSION['lang']))
		{
			$lang = $_SESSION['lang'];
		}
		else if(isSet($_COOKIE['lang']))
		{
			$lang = $_COOKIE['lang'];
		}
		else
		{
			$lang = 'en';
		}
		
		//directory name 
		  $dir = 'languages'; 
		
		//no we return the langauge wanted ! 
		//Returned String Format: dirname/filename.ext 
		  return "$dir/$lang.lng"; 
	} 
	?>
	<?php
	//this function will check user language and return the file name to be included .. 
	$lang = check_lang();
	$_SESSION['abc'] = 'food2';
	include($lang); 
	?>
	<div id="wrapper1">
		<!-- Header : ---------------------  Start -------------------------
			Describle : banner + logo + search + link (english, vietnam, rss)-->	
		<div id="header" class="container" align="center">
			<!-- text link -->
			<div style="float:left; margin:40px 30px auto; font-size:18px; color:#666666">
				<b> Site map | 
				<a onclick="developfunction('')" id="english" 
					onmouseover="change_color_link('english', '#000000')" 
					onmouseout="change_color_link('english', '#666666')"
					href="bookroom.php?lang=en" > 
						English </a> | 
				<a onclick="refreshView()" id="vietnam" 
					onmouseover="change_color_link('vietnam', '#000000')" 
					onmouseout="change_color_link('vietnam', '#666666')"
					href="bookroom.php?lang=vn"> 
						Vietnam </a> | 
				<a id="rss" onclick="developfunction('')"
					onmouseover="change_color_link('rss', '#000000')" 
					onmouseout="change_color_link('rss', '#666666')"
					> 
						RSS </a></b>			</div>
			
<?php include_once('menu.php'); ?>
<div style="width:100%;">
	<?php if(isSet($_SESSION['error']['time'])) echo "<h3 style=\"color:red;\">".$_SESSION['error']['time']."</h3>"; ?>
	<form  name="bookroom" action="checkroom.php" method="post" align="left">
    <table width="100%" border="0">
    <tr>
    	<td colspan="2"><?php echo $lang['BOOK_ROOM']; ?></td>
    </tr>
    <tr>
    	<td><?=$lang['CHECKIN_DATE'] ?></td>
        <td>
        	<input class="inputDate2" name="inputDate2" id="inputDate2" value="<?php echo date('m/d/Y') ?>" style="width:190px;float:left;"/>
            <img class="inputDate2" src="images/calendarimage.png" width="28px" height="28px" style="margin-right:45px;margin-top:-1px;float:left;"/>
        </td>
    </tr>
    <tr>
    	<td ><?php echo $lang['CHECKOUT_DATE']; ?></td>
        <td >
        	<input class="outputDate2" name="outputDate2" id="outputDate2" value="<?php echo date('m/d/Y') ?>" style="width:190px;float:left;"/>
            <img class="outputDate2" src="images/calendarimage.png" width="28px" height="28px" style="margin-right:45px;margin-top:0px;float:left;"/>
        </td>
    </tr>
    <tr>
    	<td colspan="2"><a href="javascript:void(0);" onclick="document.forms.bookroom.submit();"><?php echo $lang['CHECK_ROOM']; ?></a></td>
    </tr>
    </table>
	</form>
</div>
 <?php include_once('footer.php'); ?>